#include <QtGui/QApplication>
#include "mainwindow.h"
#include "mmfacade.h"

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MainWindow * w = new MainWindow();
    ModelManagerFacade * mmf = new ModelManagerFacade(w);

    QObject::connect(w, SIGNAL(openOBJ(QString)), mmf, SLOT(importOBJ(QString)));
    QObject::connect(w, SIGNAL(openAM(QString)), mmf, SLOT(importAM(QString)));
    QObject::connect(w, SIGNAL(exportOBJ(QString)), mmf, SLOT(exportOBJ(QString)));
    QObject::connect(w, SIGNAL(exportAM(QString)), mmf, SLOT(exportAM(QString)));

    QObject::connect(mmf, SIGNAL(modelLoaded(model*)), w, SLOT(displayModel(model*)));

    w->show();
    return a.exec();
}
